home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 682 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  990 b 

  1. Path: atglab.bls.com!Alun.Champion
  2. From: Alun.Champion@bridge.bst.bls.com (Alun Champion)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: itoa on Unix
  5. Date: 08 Jan 1996 15:46:30 GMT
  6. Organization: Computer People Inc.
  7. Message-ID: <ALUN.CHAMPION.96Jan8104630@g7240065.bridge.bst.bls.com>
  8. References: <4cra6m$pop@baloo.pipex-sa.net>
  9. NNTP-Posting-Host: bstfirewall.bst.bls.com
  10. In-reply-to: nic@pipex-sa.net's message of 8 Jan 1996 14:37:10 GMT
  11.  
  12. In article <4cra6m$pop@baloo.pipex-sa.net> nic@pipex-sa.net (Nic Tjirkalli) writes:
  13.  
  14. : I am using gcc 2.6.3 on linux. Ineed to convert an integer to a string.
  15. : I rember from my programming days in Borland C that there was a itoa
  16. : function to convert an interger to a string. I can find no such function,
  17. : though, with gcc.
  18.  
  19. : I would greatly appreciate it if somebody could inform me of a simple
  20. : way to convert an integer to a string using gcc on unix.
  21.  
  22. Certainly.
  23. Try:
  24.    sprintf(string, "%d", integer);
  25.  
  26. Regards
  27.  
  28.   -A.
  29. -- 
  30. | A.Champion                |
  31.